package string;

import java.util.Arrays;

public class SplitDemo {
    public static void main(String[] args) {
        String line = "abc123def456ghi";
        //将line按照数字部分拆分
        String[] words =line.split("[0-9]+");
        System.out.println(Arrays.toString(words));

        line="=abc=def==ghi===k";
        words=line.split("=");
        System.out.println(words.length);
        System.out.println(Arrays.toString(words));

        line = "abc.def.ghi";
        words =line.split("\\.");
        System.out.println(Arrays.toString(words));




    }
}
